import 'package:flutter_app/generated/json/base/json_convert_content.dart';
import 'package:flutter_app/bean/article_detail_entity.dart';

ArticleDetailEntity $ArticleDetailEntityFromJson(Map<String, dynamic> json) {
	final ArticleDetailEntity articleDetailEntity = ArticleDetailEntity();
	final String? articleType = jsonConvert.convert<String>(json['articleType']);
	if (articleType != null) {
		articleDetailEntity.articleType = articleType;
	}
	final String? content = jsonConvert.convert<String>(json['content']);
	if (content != null) {
		articleDetailEntity.content = content;
	}
	final String? contentType = jsonConvert.convert<String>(json['contentType']);
	if (contentType != null) {
		articleDetailEntity.contentType = contentType;
	}
	final String? contentTypeName = jsonConvert.convert<String>(json['contentTypeName']);
	if (contentTypeName != null) {
		articleDetailEntity.contentTypeName = contentTypeName;
	}
	final String? createBy = jsonConvert.convert<String>(json['createBy']);
	if (createBy != null) {
		articleDetailEntity.createBy = createBy;
	}
	final String? createByName = jsonConvert.convert<String>(json['createByName']);
	if (createByName != null) {
		articleDetailEntity.createByName = createByName;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		articleDetailEntity.createTime = createTime;
	}
	final List<ArticleDetailFileList>? fileList = jsonConvert.convertListNotNull<ArticleDetailFileList>(json['fileList']);
	if (fileList != null) {
		articleDetailEntity.fileList = fileList;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		articleDetailEntity.id = id;
	}
	final String? isRotation = jsonConvert.convert<String>(json['isRotation']);
	if (isRotation != null) {
		articleDetailEntity.isRotation = isRotation;
	}
	final String? isTop = jsonConvert.convert<String>(json['isTop']);
	if (isTop != null) {
		articleDetailEntity.isTop = isTop;
	}
	final String? publishBy = jsonConvert.convert<String>(json['publishBy']);
	if (publishBy != null) {
		articleDetailEntity.publishBy = publishBy;
	}
	final String? publishByName = jsonConvert.convert<String>(json['publishByName']);
	if (publishByName != null) {
		articleDetailEntity.publishByName = publishByName;
	}
	final String? publishTime = jsonConvert.convert<String>(json['publishTime']);
	if (publishTime != null) {
		articleDetailEntity.publishTime = publishTime;
	}
	final String? xSource = jsonConvert.convert<String>(json['source']);
	if (xSource != null) {
		articleDetailEntity.xSource = xSource;
	}
	final String? state = jsonConvert.convert<String>(json['state']);
	if (state != null) {
		articleDetailEntity.state = state;
	}
	final String? summary = jsonConvert.convert<String>(json['summary']);
	if (summary != null) {
		articleDetailEntity.summary = summary;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		articleDetailEntity.title = title;
	}
	final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
	if (updateBy != null) {
		articleDetailEntity.updateBy = updateBy;
	}
	final String? updateByName = jsonConvert.convert<String>(json['updateByName']);
	if (updateByName != null) {
		articleDetailEntity.updateByName = updateByName;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		articleDetailEntity.updateTime = updateTime;
	}
	return articleDetailEntity;
}

Map<String, dynamic> $ArticleDetailEntityToJson(ArticleDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['articleType'] = entity.articleType;
	data['content'] = entity.content;
	data['contentType'] = entity.contentType;
	data['contentTypeName'] = entity.contentTypeName;
	data['createBy'] = entity.createBy;
	data['createByName'] = entity.createByName;
	data['createTime'] = entity.createTime;
	data['fileList'] =  entity.fileList?.map((v) => v.toJson()).toList();
	data['id'] = entity.id;
	data['isRotation'] = entity.isRotation;
	data['isTop'] = entity.isTop;
	data['publishBy'] = entity.publishBy;
	data['publishByName'] = entity.publishByName;
	data['publishTime'] = entity.publishTime;
	data['source'] = entity.xSource;
	data['state'] = entity.state;
	data['summary'] = entity.summary;
	data['title'] = entity.title;
	data['updateBy'] = entity.updateBy;
	data['updateByName'] = entity.updateByName;
	data['updateTime'] = entity.updateTime;
	return data;
}

ArticleDetailFileList $ArticleDetailFileListFromJson(Map<String, dynamic> json) {
	final ArticleDetailFileList articleDetailFileList = ArticleDetailFileList();
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		articleDetailFileList.createTime = createTime;
	}
	final String? duration = jsonConvert.convert<String>(json['duration']);
	if (duration != null) {
		articleDetailFileList.duration = duration;
	}
	final String? fileSize = jsonConvert.convert<String>(json['fileSize']);
	if (fileSize != null) {
		articleDetailFileList.fileSize = fileSize;
	}
	final String? fileType = jsonConvert.convert<String>(json['fileType']);
	if (fileType != null) {
		articleDetailFileList.fileType = fileType;
	}
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		articleDetailFileList.id = id;
	}
	final String? isRead = jsonConvert.convert<String>(json['isRead']);
	if (isRead != null) {
		articleDetailFileList.isRead = isRead;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		articleDetailFileList.name = name;
	}
	final String? relationId = jsonConvert.convert<String>(json['relationId']);
	if (relationId != null) {
		articleDetailFileList.relationId = relationId;
	}
	final String? sourcePath = jsonConvert.convert<String>(json['sourcePath']);
	if (sourcePath != null) {
		articleDetailFileList.sourcePath = sourcePath;
	}
	final String? thumbnailPath = jsonConvert.convert<String>(json['thumbnailPath']);
	if (thumbnailPath != null) {
		articleDetailFileList.thumbnailPath = thumbnailPath;
	}
	return articleDetailFileList;
}

Map<String, dynamic> $ArticleDetailFileListToJson(ArticleDetailFileList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['createTime'] = entity.createTime;
	data['duration'] = entity.duration;
	data['fileSize'] = entity.fileSize;
	data['fileType'] = entity.fileType;
	data['id'] = entity.id;
	data['isRead'] = entity.isRead;
	data['name'] = entity.name;
	data['relationId'] = entity.relationId;
	data['sourcePath'] = entity.sourcePath;
	data['thumbnailPath'] = entity.thumbnailPath;
	return data;
}